#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <po_hi_time.h>

void* routine (void* arg)
{
  __po_hi_time_t time;
  __po_hi_time_t time2;
  __po_hi_time_t time_complete;

  while (1)
    {
      printf ("test\n");
      __po_hi_get_time (&time);
      time2 = __po_hi_milliseconds (500);
      time_complete = __po_hi_add_times (time, time2);
      __po_hi_delay_until (time_complete);
    }
}

int main (int argc, char* argv[], char** arge)
{
  pthread_t mythread;
  pthread_create (&mythread, NULL, routine, NULL);
  pthread_join (mythread , NULL);
  exit (0);
}
